package day0812.huawei;


import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main2 {
    List<List<Integer>> list =new ArrayList<>();

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        String s = sc.nextLine();
        int k = Integer.parseInt(s1);
        int num = Integer.parseInt(s2);
        String[] str = s.split(",");
        int []array = new int[str.length];
        for (int i = 0; i <str.length ; i++) {
            array[i] = Integer.parseInt(str[i]);
        }
        Main2 main2 = new Main2();
        main2.dfs(array,0,new ArrayList<Integer>());
        int count=0;
        for (List<Integer> li:main2.list) {
            if(li.size()>0){
                int number = li.size()/k;
                count=count+number;
            }
        }
        System.out.println(count);
    }
    public  void dfs(int[] array,int startIndex,List<Integer>arrList){
        if(startIndex>=array.length){
            return;
        }
        for (int i = startIndex; i < array.length; i++) {
            if(array[i]<0){
                arrList.add(array[i]);

            }else{
                list.add(new ArrayList<>(arrList));
                break;
            }
        }
    }
}
